<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>表单设计器</title>
		<link rel="icon" href="favicon.ico" />
		<script>
			//表单页面相关的全局参数
			var PAGE_IS_DESIGN = true;
			var modelType, modelId, pageId, pageType, pageKind;
			function _get_parameter_from_url(param_name){
				var url = window.location.href;
				var params = {};
				if(url && url.indexOf("?")>0){
					var param_str = url.substring(url.lastIndexOf("?")+1);
					if(param_str){
						var param_list = param_str.split("&");
						if(param_list && param_list.length>0){
							for(var i=0; i<param_list.length; i++){
								var tmp_key = param_list[i].substring(0,param_list[i].indexOf("="));
								var tmp_value = param_list[i].substring(1+param_list[i].indexOf("="));
								if(param_name && tmp_key===param_name){
									return tmp_value;
								}
								params[tmp_key] = tmp_value;
							}
						}
					}
				}
				if(param_name){
					//没取到指定的参数
					return;
				}
				return params;
			}
			modelType = _get_parameter_from_url("modelType");
			modelId   = _get_parameter_from_url("modelId");
			pageId    = _get_parameter_from_url("id");
			pageType  = _get_parameter_from_url("pageType");
		</script>
	</head>

	<body>
		<div class="">
			<div class="navbar-layoutit">
				<div class="header-title">
					<span class="header-title-brand">表单设计器</span>
				</div>
				<div class="header-menu">
					<div class="btn-group btn-group-sm" role="group" aria-label="...">
						<button type="button" class="btn btn-success btn-view"><span class="glyphicon glyphicon-eye-open"></span>&nbsp;预览</button>
						<button type="button" class="btn btn-success btn-save"><span class="glyphicon glyphicon-floppy-save"></span>&nbsp;保存</button>
					</div>
					<div class="btn-group btn-group-sm" role="group" aria-label="...">
						<button type="button" class="btn btn-primary btn-readonly-y"><span class="glyphicon glyphicon-ban-circle"></span>&nbsp;全部设为只读</button>
						<button type="button" class="btn btn-primary btn-readonly-n"><span class="glyphicon glyphicon-ok-circle"></span>&nbsp;全部取消只读</button>
					</div>
					<div class="btn-group btn-group-sm" role="group" aria-label="...">
						<button type="button" class="btn btn-warning btn-config"><span class="glyphicon glyphicon-cog"></span>&nbsp;设置</button>
						<button type="button" class="btn btn-warning btn-empty"><span class="glyphicon glyphicon-trash"></span>&nbsp;清空</button>
					</div>
				</div>
			</div>
			<div id="drag-workarea">
				<div id="layout-left">
					<div class="sidebar-nav">
						<div>
							<ul class="nav nav-list accordion-group">
								<li>
									<div class="bs-callout bs-callout-info">布局设置</div>
								</li>
								<li class="rows de-small">
									<div class="lyrow ui-draggable content-column">
										<div>
											<i class="glyphicon glyphicon-th"></i> 布局
										</div>
									</div>
								</li>
							</ul>
							<ul class="nav nav-list accordion-group">
								<li>
									<div class="bs-callout bs-callout-info">模型字段</div>
								</li>
								<li id="model-field-li" class="rows de-small">
									
								</li>
							</ul>
							<ul class="nav nav-list accordion-group">
								<li>
									<div class="bs-callout bs-callout-info">基本元素</div>
								</li>
								<li id="basic-components-li" class="rows de-small">
									
								</li>
							</ul>
						</div>
					</div>
				</div>
				<div id="layout-main" class="ui-sortable none-form-horizontal" style="background-color: white;">

					<div class="lyrow ui-draggable content-column ui-draggable-handle formdesigner-v2021">
						<span class="btn-wrapper">
							<span title="拖动" class="btn-drag drag"><i class="glyphicon glyphicon-move"></i></span>
							<span title="删除" class="btn-remove remove-content-column"><i class="glyphicon glyphicon-trash"></i></span>
						</span>
						<div class="drag-form-title"><span contenteditable="false" class="laytitle">标题</span></div>
						<div class="drag-form-lay ui-sortable"></div>
					</div>
				</div>
				<div id="layout-right" style="overflow-x: visible; overflow-y: auto;">
					<div>
							<ul class="nav nav-list accordion-group">
								<li>
									<div class="bs-callout bs-callout-info">表单设置</div>
								</li>
								<li id="form-setting" class="rows de-small">
									<div style="text-align: center;">
										<span style="color: #cfe6fb;font-size: 100px;" class="glyphicon glyphicon-copy"></span><br>
										<span style="color: #333;font-size: 14px;">请选择表单</span><br>
									</div>
								</li>
								
								<li>
									<div class="bs-callout bs-callout-info">事件定义</div>
								</li>
								<li id="form-event-setting" class="rows de-small">
									
									<div class="btn-add-customevent"><button type="button" class="btn btn-info">添加事件</button></div>
									
								</li>
							</ul>
					</div>

				</div>
			</div>
		</div>
		
		
		<!--  模态框 - 全局配置  -->
		<div class="modal fade" id="form-config-modal" tabindex="-1" role="dialog" data-backdrop="false">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
						<h4 class="modal-title">表单配置</h4>
					</div>
					<div class="modal-body">
						<form>
							<div class="form-group">
								<label for="formConfig-postAddress">数据提交地址</label>
								<input type="text" class="form-control" id="formConfig-postAddress" title="不填时使用默认地址" placeholder="不填时使用默认地址">
							</div>
							<div class="form-group">
								<label for="formConfig-dataAddress">数据加载地址</label>
								<input type="text" class="form-control" id="formConfig-dataAddress" title="不填时使用默认地址" placeholder="不填时使用默认地址">
							</div>
						</form>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
						<button type="button" class="btn btn-primary btn-save">保存</button>
					</div>
				</div>
			</div>
		</div>
			
		<script src="assets/js/lib/require-2.3.6/require.js" data-main="assets/js/main"></script>
	</body>

</html>